// apis/user.js
// 引入网络请求模块
import { uniFetch } from './uni-fetch'
import {rsaEncrypt} from '@/utils/rsa'

// 登录验证码
export function getCode(data){
  const data1 = rsaEncrypt(data)
  return uniFetch({
    url:'/miniApp/memberLogin/getCaptcha',
    method:'get',
    data:{
      data:data1
    }
  })
}
// 登录
export function login(data){
  const data1 = rsaEncrypt(data)
  return uniFetch({
    url:'/miniApp/memberLogin/loginAuth',
    method:'post',
    data:{
      data:data1
    }
  })
}


// 获取会员信息
export function getMemberInfo(data){
  return uniFetch({
    url:'/miniApp/member/getMemberInfo',
    method:'get',
    data
  })
}
